﻿CREATE PROCEDURE [dbo].[sp_Reset_User]
	@UserId VARCHAR(10), 
	@Password VARCHAR(50)
AS
	UPDATE [dbo].[Accounts]
   SET [Password] = @Password
      ,[Status] = 0
      ,[LastLogin] = NULL
      ,[ForceChangePassword] = 1
      ,[FailedLoginTimes] = 0
      ,[GraceLoginTimes] = 0
 WHERE [AccountID] = @UserId
RETURN 0;